<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="Hexo Theme Redefine">
    
    <meta name="author" content="xiaoeryu">
    <!-- preconnect -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

    
    <!--- Seo Part-->
    
    <link rel="canonical" href="https://xiaoeeyu.github.io/2024/06/06/java层ssl通信抓包与溯源/"/>
    <meta name="robots" content="index,follow">
    <meta name="googlebot" content="index,follow">
    <meta name="revisit-after" content="1 days">
    
    
    
        
        <meta name="description" content="http&#x2F;https都是建立在tcp&#x2F;udp之上应用层的协议，SSL&#x2F;TLS又是HTTPS工作的一个基础，所以对socket进行字段溯源的时候绕不开的一个就是HTTPS协议。但是HTTPS是加密的，另外它中间还有证书验证，所以通过抓包工具无法直接抓到数据包。 在这篇文章中我们先尝试通过源码分析HTTPS的加密流程，获取hook点。通过FridaHook的方式抓到数据包。">
<meta property="og:type" content="article">
<meta property="og:title" content="Java层SSL通信抓包与溯源">
<meta property="og:url" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/index.html">
<meta property="og:site_name" content="xiaoeryu">
<meta property="og:description" content="http&#x2F;https都是建立在tcp&#x2F;udp之上应用层的协议，SSL&#x2F;TLS又是HTTPS工作的一个基础，所以对socket进行字段溯源的时候绕不开的一个就是HTTPS协议。但是HTTPS是加密的，另外它中间还有证书验证，所以通过抓包工具无法直接抓到数据包。 在这篇文章中我们先尝试通过源码分析HTTPS的加密流程，获取hook点。通过FridaHook的方式抓到数据包。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240605161625342.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240605160219365.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606020010121.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606034621189.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606041858434.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606043108451.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606044534425.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606044754605.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606052048409.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606220920769.png">
<meta property="og:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606220944827.png">
<meta property="article:published_time" content="2024-06-06T14:06:18.000Z">
<meta property="article:modified_time" content="2024-06-09T09:29:18.502Z">
<meta property="article:author" content="xiaoeryu">
<meta property="article:tag" content="App抓包">
<meta property="article:tag" content="Frida Hook">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xiaoeeyu.github.io/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240605161625342.png">
    
    
    <!--- Icon Part-->
    <link rel="icon" type="image/png" href="/images/rabete.jpg" sizes="192x192">
    <link rel="apple-touch-icon" sizes="180x180" href="/images/rabete.jpg">
    <meta name="theme-color" content="#A31F34">
    <link rel="shortcut icon" href="/images/rabete.jpg">
    <!--- Page Info-->
    
    <title>
        
            Java层SSL通信抓包与溯源 | xiaoeryu
        
    </title>

    
<link rel="stylesheet" href="/fonts/Chillax/chillax.css">


    <!--- Inject Part-->
    

    
<link rel="stylesheet" href="/css/style.css">


    
        
<link rel="stylesheet" href="/css/build/tailwind.css">

    

    
<link rel="stylesheet" href="/fonts/GeistMono/geist-mono.css">

    
<link rel="stylesheet" href="/fonts/Geist/geist.css">

    <!--- Font Part-->
    
    
    
    
    
    

    <script id="hexo-configurations">
    window.config = {"hostname":"xiaoeeyu.github.io","root":"/","language":"zh-CN","path":"search.xml"};
    window.theme = {"articles":{"style":{"font_size":"16px","line_height":1.5,"image_border_radius":"14px","image_alignment":"center","image_caption":false,"link_icon":true,"delete_mask":false,"title_alignment":"left","headings_top_spacing":{"h1":"3.2rem","h2":"2.4rem","h3":"1.9rem","h4":"1.6rem","h5":"1.4rem","h6":"1.3rem"}},"word_count":{"enable":true,"count":true,"min2read":true},"author_label":{"enable":true,"auto":false,"list":[]},"code_block":{"copy":true,"style":"mac","highlight_theme":{"light":"github","dark":"vs2015"},"font":{"enable":false,"family":null,"url":null}},"toc":{"enable":true,"max_depth":4,"number":false,"expand":true,"init_open":true},"copyright":{"enable":true,"default":"cc_by_nc_sa"},"lazyload":true,"pangu_js":false,"recommendation":{"enable":false,"title":"推荐阅读","limit":3,"mobile_limit":2,"placeholder":"/images/ball-0101.jpg","skip_dirs":[]}},"colors":{"primary":"#A31F34","secondary":null,"default_mode":"light"},"global":{"fonts":{"chinese":{"enable":false,"family":null,"url":null},"english":{"enable":false,"family":null,"url":null},"title":{"enable":false,"family":null,"url":null}},"content_max_width":"1000px","sidebar_width":"210px","hover":{"shadow":true,"scale":false},"scroll_progress":{"bar":false,"percentage":true},"website_counter":{"url":"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js","enable":true,"site_pv":true,"site_uv":true,"post_pv":true},"single_page":true,"preloader":{"enable":false,"custom_message":null},"open_graph":true,"google_analytics":{"enable":false,"id":null}},"home_banner":{"enable":true,"style":"fixed","image":{"light":"/images/wallhaven-jxl31y.png","dark":"/images/wallhaven-o5762l.png"},"title":"XIAOERYU","subtitle":{"text":["明心见性，拨云见日","Don't wait, to create"],"hitokoto":{"enable":false,"show_author":false,"api":"https://v1.hitokoto.cn"},"typing_speed":100,"backing_speed":80,"starting_delay":500,"backing_delay":1500,"loop":true,"smart_backspace":true},"text_color":{"light":"#fff","dark":"#d1d1b6"},"text_style":{"title_size":"2.8rem","subtitle_size":"1.5rem","line_height":1.2},"custom_font":{"enable":false,"family":null,"url":null},"social_links":{"enable":true,"style":"default","links":{"github":"https://github.com/xiaoeeyu","instagram":null,"zhihu":null,"twitter":null,"email":"xiaoeryu@163.com"},"qrs":{"weixin":null}}},"plugins":{"feed":{"enable":false},"aplayer":{"enable":false,"type":"fixed","audios":[{"name":null,"artist":null,"url":null,"cover":null,"lrc":null}]},"mermaid":{"enable":false,"version":"9.3.0"}},"version":"2.8.2","navbar":{"auto_hide":false,"color":{"left":"#f78736","right":"#367df7","transparency":35},"width":{"home":"1200px","pages":"1000px"},"links":{"Home":{"path":"/","icon":"fa-regular fa-house"},"Archives":{"path":"/archives","icon":"fa-regular fa-archive"}},"search":{"enable":true,"preload":true}},"page_templates":{"friends_column":2,"tags_style":"blur"},"home":{"sidebar":{"enable":true,"position":"left","first_item":"menu","announcement":null,"show_on_mobile":true,"links":null},"article_date_format":"auto","excerpt_length":200,"categories":{"enable":true,"limit":3},"tags":{"enable":true,"limit":3}},"footerStart":"2022/8/17 11:45:14"};
    window.lang_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 个月前","year":"%s 年前"};
    window.data = {"masonry":false};
  </script>
    
    <!--- Fontawesome Part-->
    
<link rel="stylesheet" href="/fontawesome/fontawesome.min.css">

    
<link rel="stylesheet" href="/fontawesome/brands.min.css">

    
<link rel="stylesheet" href="/fontawesome/solid.min.css">

    
<link rel="stylesheet" href="/fontawesome/regular.min.css">

    
    
    
    
<meta name="generator" content="Hexo 6.3.0">
<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
</head>



<body>
	<div class="progress-bar-container">
	

	
	<span class="pjax-progress-bar"></span>
	<!--        <span class="swup-progress-icon">-->
	<!--            <i class="fa-solid fa-circle-notch fa-spin"></i>-->
	<!--        </span>-->
	
</div>

<main class="page-container" id="swup">

	

	<div class="main-content-container flex flex-col justify-between min-h-dvh">
		<div class="main-content-header">
			<header class="navbar-container px-6 md:px-12">
    <div class="navbar-content transition-navbar ">
        <div class="left">
            
                <a class="logo-image h-8 w-8 sm:w-10 sm:h-10 mr-3" href="/">
                    <img src="/images/rabete.jpg" class="w-full h-full rounded-sm">
                </a>
            
            <a class="logo-title" href="/">
                
                xiaoeryu
                
            </a>
        </div>

        <div class="right">
            <!-- PC -->
            <div class="desktop">
                <ul class="navbar-list">
                    
                        
                            

                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class=""
                                   href="/"
                                        >
                                    <i class="fa-regular fa-house fa-fw"></i>
                                    首页
                                    
                                </a>

                                <!-- Submenu -->
                                
                            </li>
                    
                        
                            

                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class=""
                                   href="/archives"
                                        >
                                    <i class="fa-regular fa-archive fa-fw"></i>
                                    归档
                                    
                                </a>

                                <!-- Submenu -->
                                
                            </li>
                    
                    
                        <li class="navbar-item search search-popup-trigger">
                            <i class="fa-solid fa-magnifying-glass"></i>
                        </li>
                    
                </ul>
            </div>
            <!-- Mobile -->
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fa-solid fa-magnifying-glass"></i>
                    </div>
                
                <div class="icon-item navbar-bar">
                    <div class="navbar-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile sheet -->
    <div class="navbar-drawer h-dvh w-full absolute top-0 left-0 bg-background-color flex flex-col justify-between">
        <ul class="drawer-navbar-list flex flex-col px-4 justify-center items-start">
            
                
                    

                    <li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
                        
                        <a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full "
                           href="/"
                        >
                            <span>
                                首页
                            </span>
                            
                                <i class="fa-regular fa-house fa-sm fa-fw"></i>
                            
                        </a>
                        

                        
                    </li>
            
                
                    

                    <li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
                        
                        <a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full "
                           href="/archives"
                        >
                            <span>
                                归档
                            </span>
                            
                                <i class="fa-regular fa-archive fa-sm fa-fw"></i>
                            
                        </a>
                        

                        
                    </li>
            

            
            
        </ul>

        <div class="statistics flex justify-around my-2.5">
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/tags">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">92</div>
        <div class="label text-third-text-color text-sm">标签</div>
    </a>
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/categories">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">14</div>
        <div class="label text-third-text-color text-sm">分类</div>
    </a>
    <a class="item tag-count-item flex flex-col justify-center items-center w-20" href="/archives">
        <div class="number text-2xl sm:text-xl text-second-text-color font-semibold">112</div>
        <div class="label text-third-text-color text-sm">文章</div>
    </a>
</div>
    </div>

    <div class="window-mask"></div>

</header>


		</div>

		<div class="main-content-body transition-fade-up">
			

			<div class="main-content">
				<div class="post-page-container flex relative justify-between box-border w-full h-full">
	<div class="article-content-container">

		<div class="article-title relative w-full">
			
			<div class="w-full flex items-center pt-6 justify-start">
				<h1 class="article-title-regular text-second-text-color tracking-tight text-4xl md:text-6xl font-semibold px-2 sm:px-6 md:px-8 py-3">Java层SSL通信抓包与溯源</h1>
			</div>
			
		</div>

		
		<div class="article-header flex flex-row gap-2 items-center px-2 sm:px-6 md:px-8">
			<div class="avatar w-[46px] h-[46px] flex-shrink-0 rounded-medium border border-border-color p-[1px]">
				<img src="/images/rabete.jpg">
			</div>
			<div class="info flex flex-col justify-between">
				<div class="author flex items-center">
					<span class="name text-default-text-color text-lg font-semibold">xiaoeryu</span>
					
					<span class="author-label ml-1.5 text-xs px-2 py-0.5 rounded-small text-third-text-color border border-shadow-color-1">Lv5</span>
					
				</div>
				<div class="meta-info">
					<div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fa-regular fa-pen-fancy"></i>&nbsp;
        <span class="desktop">2024-06-06 22:06:18</span>
        <span class="mobile">2024-06-06 22:06:18</span>
        <span class="hover-info">创建</span>
    </span>
    
        <span class="article-date article-meta-item">
            <i class="fa-regular fa-wrench"></i>&nbsp;
            <span class="desktop">2024-06-09 17:29:18</span>
            <span class="mobile">2024-06-09 17:29:18</span>
            <span class="hover-info">更新</span>
        </span>
    

    
        <span class="article-categories article-meta-item">
            <i class="fa-regular fa-folders"></i>&nbsp;
            <ul>
                
                
                    
                        
                        <li>
                            <a href="/categories/Android%E9%80%86%E5%90%91/">Android逆向</a>&nbsp;
                        </li>
                    
                    
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fa-regular fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/App%E6%8A%93%E5%8C%85/">App抓包</a>&nbsp;
                    </li>
                
                    <li>
                        | <a href="/tags/Frida-Hook/">Frida Hook</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

				</div>
			</div>
		</div>
		

		


		<div class="article-content markdown-body px-2 sm:px-6 md:px-8 pb-8">
			<p>http/https都是建立在tcp/udp之上应用层的协议，SSL/TLS又是HTTPS工作的一个基础，所以对socket进行字段溯源的时候绕不开的一个就是HTTPS协议。但是HTTPS是加密的，另外它中间还有证书验证，所以通过抓包工具无法直接抓到数据包。</p>
<p>在这篇文章中我们先尝试通过源码分析HTTPS的加密流程，获取hook点。通过FridaHook的方式抓到数据包。</p>
<span id="more"></span>

<p>这里同样写一个使用okhttp去访问<strong><a class="link" target="_blank" rel="noopener" href="https://www.baidu.com/">https://www.baidu.com<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a></strong>的<a class="link" target="_blank" rel="noopener" href="https://github.com/xiaoeeyu/OkhttpsDemo">Demo App<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a></p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240605161625342.png" class="" title="image-20240605161625342">

<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240605160219365.png" class="" title="image-20240605160219365">

<p>环境：</p>
<blockquote>
<p>环境跟前两篇文章用的不同，因为pixel XL的手机电池鼓包game over了，可能电脑连接的USB接口上电流不稳定+时间长没拔发热严重的原因。换了一台pixel 5来测试，虚拟机换了kali，因为安装的在Ubuntu上安装了新版Charles界面显示有点问题，还是新版kali更好看点</p>
<p>Android版本：11.0</p>
<p>虚拟机：kali 2023.4</p>
</blockquote>
<h3 id="那环境配置不再啰嗦，直接开始调试吧"><a href="#那环境配置不再啰嗦，直接开始调试吧" class="headerlink" title="那环境配置不再啰嗦，直接开始调试吧"></a>那环境配置不再啰嗦，直接开始调试吧</h3><img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606020010121.png" class="" title="image-20240606020010121">

<p>因为这里都是多线程，所以没法一步一步的单步调试，只能下断点F9执行然后往断点上撞了：因为HTTP/HTTPS无论如何都是要经过socket执行的所以我们这里在<code>connectSocket</code>都下了断点</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606034621189.png" class="" title="image-20240606034621189">

<p>分析这段代码可知</p>
<blockquote>
<pre><code class="java"> try {
   Platform.get().connectSocket(rawSocket, route.socketAddress(), connectTimeout);
 } catch (ConnectException e) {
   throw new ConnectException("Failed to connect to " + route.socketAddress());
 }
</code></pre>
<ul>
<li>使用前面创建的套接字来尝试连接目标地址</li>
</ul>
<p>创建缓冲的输入和输出流，方便后续的读写操作</p>
<pre><code class="java">source = Okio.buffer(Okio.source(rawSocket));	// 创建一个带缓冲的输入流
sink = Okio.buffer(Okio.sink(rawSocket));		// 创建一个带缓冲的输出流
</code></pre>
<ul>
<li>使用<strong>Okio</strong>库为套接字创建输入和输出流缓冲区，我们抓包的目的就是通过hook拿到输入（接收数据）和输出（发送数据），跟进Okio.java分析</li>
</ul>
</blockquote>
<h4 id="分析Okio-java中对输出流缓冲区的操作"><a href="#分析Okio-java中对输出流缓冲区的操作" class="headerlink" title="分析Okio.java中对输出流缓冲区的操作"></a>分析<code>Okio.java</code>中对输出流缓冲区的操作</h4><img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606041858434.png" class="" title="image-20240606041858434">

<ul>
<li>这里进行了一些检查判断数据是否为空，不为空就调用<code>write</code>方法循环将数据从buffer写到<code>OutputStream</code>中</li>
<li>之后调用<code>OutputStream</code>的<code>flush</code>方法，确保所有数据都已写入底层流</li>
<li>所以我们等下直接去Android 11的源码中去找<code>java.net.SocketinputStream-&gt;write()</code>看怎么hook能获取到输出流</li>
</ul>
<h4 id="分析Okio-java中对输入流缓冲区的操作"><a href="#分析Okio-java中对输入流缓冲区的操作" class="headerlink" title="分析Okio.java中对输入流缓冲区的操作"></a>分析<code>Okio.java</code>中对输入流缓冲区的操作</h4><img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606043108451.png" class="" title="image-20240606043108451">

<ul>
<li>这里同样的使用<code>read</code>方法从<code>InputStream</code>读取数据</li>
<li>同样去Android源码中找<code>java.net.SocketinputStream-&gt;read()</code></li>
</ul>
<h3 id="源码分析"><a href="#源码分析" class="headerlink" title="源码分析"></a>源码分析</h3><p>不确定在哪个模块中，直接在Android11的源码中全局搜索</p>
<h5 id="java-net-SocketinputStream-gt-write"><a href="#java-net-SocketinputStream-gt-write" class="headerlink" title="java.net.SocketinputStream->write()"></a>java.net.SocketinputStream-&gt;write()</h5><img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606044534425.png" class="" title="image-20240606044534425">

<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606044754605.png" class="" title="image-20240606044754605">

<ul>
<li>进来之后直接找到了它最终调用的JNI函数<code>socketWrite0()</code>等下直接hook这个函数</li>
</ul>
<h5 id="java-net-SocketinputStream-gt-read"><a href="#java-net-SocketinputStream-gt-read" class="headerlink" title="java.net.SocketinputStream->read()"></a>java.net.SocketinputStream-&gt;read()</h5><p>基本跟刚刚是一样的流程（代码太长了不好截图，直接贴了下来）</p>
<pre><code class="java">97      private native int socketRead0(FileDescriptor fd,
98                                     byte b[], int off, int len,
99                                     int timeout)
100          throws IOException;
101  
    
。。。。。。
    
115      private int socketRead(FileDescriptor fd,
116                             byte b[], int off, int len,
117                             int timeout)
118          throws IOException {
119          return socketRead0(fd, b, off, len, timeout);
120      }

。。。。。。
    
147      int read(byte b[], int off, int length, int timeout) throws IOException {
148          int n;
149  
150          // EOF already encountered
151          if (eof) {
152              return -1;
153          }
154  
155          // connection reset
156          if (impl.isConnectionReset()) {
157              throw new SocketException("Connection reset");
158          }
159  
160          // bounds check
161          if (length &lt;= 0 || off &lt; 0 || length &gt; b.length - off) {
162              if (length == 0) {
163                  return 0;
164              }
165              throw new ArrayIndexOutOfBoundsException("length == " + length
166                      + " off == " + off + " buffer length == " + b.length);
167          }
168  
169          boolean gotReset = false;
170  
171          // acquire file descriptor and do the read
172          FileDescriptor fd = impl.acquireFD();
173          try {
174              // Android-added: Check BlockGuard policy in read().
175              BlockGuard.getThreadPolicy().onNetwork();
176              n = socketRead(fd, b, off, length, timeout);	// 标记
177              if (n &gt; 0) {
178                  return n;
179              }
180          } catch (ConnectionResetException rstExc) {
181              gotReset = true;
182          } finally {
183              impl.releaseFD();
184          }
185  
186          /*
187           * We receive a "connection reset" but there may be bytes still
188           * buffered on the socket
189           */
190          if (gotReset) {
191              impl.setConnectionResetPending();
192              impl.acquireFD();
193              try {
194                  n = socketRead(fd, b, off, length, timeout);	// 标记
195                  if (n &gt; 0) {
196                      return n;
197                  }
198              } catch (ConnectionResetException rstExc) {
199              } finally {
200                  impl.releaseFD();
201              }
202          }
203  
204          /*
205           * If we get here we are at EOF, the socket has been closed,
206           * or the connection has been reset.
207           */
208          if (impl.isClosedOrPending()) {
209              throw new SocketException("Socket closed");
210          }
211          if (impl.isConnectionResetPending()) {
212              impl.setConnectionReset();
213          }
214          if (impl.isConnectionReset()) {
215              throw new SocketException("Connection reset");
216          }
217          eof = true;
218          return -1;
219      }
</code></pre>
<h3 id="FridaHook"><a href="#FridaHook" class="headerlink" title="FridaHook"></a>FridaHook</h3><h4 id="hook点"><a href="#hook点" class="headerlink" title="hook点"></a>hook点</h4><pre><code class="js">// 发送数据
//  java.net.SocketinputStream-&gt;socketRead0()
private native int socketRead0(FileDescriptor fd,
                               byte b[], int off, int len,
                               int timeout)
// 接收数据
// java.net.SocketinputStream-&gt;socketRead0()
private native void socketWrite0(FileDescriptor fd, byte[] b, int off,
                                 int len) throws IOException;
</code></pre>
<ul>
<li>最后发现这两个hook点跟我们之前Java层socket的TCP hook点是一样的</li>
</ul>
<h4 id="编写脚本"><a href="#编写脚本" class="headerlink" title="编写脚本"></a>编写脚本</h4><p>直接使用原来的脚本稍微修改一下就ok了</p>
<pre><code class="js">function LogPrint(log) {
    var theDate = new Date();
    var hour = theDate.getHours();
    var minute = theDate.getMinutes();
    var second = theDate.getSeconds();
    var mSecond = theDate.getMilliseconds();

    hour &lt; 10 ? hour = "0" + hour : hour;
    minute &lt; 10 ? minute = "0" + minute : minute;
    second &lt; 10 ? second = "0" + second : second;
    mSecond &lt; 10 ? mSecond = "00" + mSecond : mSecond &lt; 100 ? mSecond = "0" + mSecond : mSecond;
    var time = hour + ":" + minute + ":" + second + ":" + mSecond;
    var threadid = Process.getCurrentThreadId();
    console.log("[" + time + "]" + "-&gt;threadid:" + threadid + "--" + log);

}
function printJavaStack(name) {
    Java.perform(function () {
        var Exception = Java.use("java.lang.Exception");
        var ins = Exception.$new("Exception");
        var straces = ins.getStackTrace();
        if (straces != undefined &amp;&amp; straces != null) {
            var strace = straces.toString();
            var replaceStr = strace.replace(/,/g, " \n ");
            LogPrint("=============================" + name + " Stack strat=======================");
            LogPrint(replaceStr);
            LogPrint("=============================" + name + " Stack end======================= \n ");
            Exception.$dispose();
        }
    });
}

// 对可打印字符区间进行一个判断只打印可打印字符
function isprintable(value) {
    if (value &gt;= 32 &amp;&amp; value &lt;= 126) {
        return true
    }
    return false
}

function hookssl() {
    Java.perform(function () {

        var SocketInputStreamClass = Java.use('java.net.SocketInputStream')
        // hook socketRead0()
        SocketInputStreamClass.socketRead0.implementation = function (arg0, arg1, arg2, arg3, arg4) {
            var size = this.socketRead0(arg0, arg1, arg2, arg3, arg4)
            console.log("[" + Process.getCurrentThreadId() + "]socketRead0 &gt; size: " + size + ",content: " + JSON.stringify(arg1))
            var byteArray = Java.array("byte", arg1)
            var content = '';
            for (var i = 0; i &lt; size; i++) {
                if (isprintable(byteArray[i])) {
                    content = content + String.fromCharCode(byteArray[i])
                }
            }
            var socketimpl = this.impl.value
            var address = socketimpl.address.value
            var port = socketimpl.port.value

            console.log("\naddress:" + address + ",port: " + port + "\n" + JSON.stringify(this.socket.value) + "\n[" + Process.getCurrentThreadId() + "]receive:" + content);

            printJavaStack('socketRead0()...')
            return size;
        }


        var SocketOutputStreamClass = Java.use('java.net.SocketOutputStream')
        // hook socketWrite0()
        SocketOutputStreamClass.socketWrite0.implementation = function (arg0, arg1, arg2, arg3) {
            var result = this.socketWrite0(arg0, arg1, arg2, arg3)
            console.log("[" + Process.getCurrentThreadId() + "]socketWrite0 &gt; result: " + arg3 + "--content: " + JSON.stringify(arg1))
            var byteArray = Java.array("byte", arg1)
            var content = '';
            for (var i = 0; i &lt; arg3; i++) {
                if (isprintable(byteArray[i])) {
                    content = content + String.fromCharCode(byteArray[i])
                }
            }

            var socketimpl = this.impl.value
            var address = socketimpl.address.value
            var port = socketimpl.port.value

            // console.log("[" + Process.getCurrentThreadId() + "]send: " + content)
            console.log("send address:" + address + ",port: " + port + "[" + Process.getCurrentThreadId() + "]send:" + content);
            console.log("\n" + JSON.stringify(this.socket.value));
            printJavaStack('socketWrite0()...')
            return result;
        }
    })
}

function main() {
    hookssl()
}

setImmediate(main)
</code></pre>
<h4 id="执行hook"><a href="#执行hook" class="headerlink" title="执行hook"></a>执行hook</h4><p><code>frida -UF -l hookSSL.js -o OkhttpDemo.log</code></p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606052048409.png" class="" title="image-20240606052048409">

<ul>
<li>这里成功的抓到了数据包，也把调用的堆栈打印了出来</li>
</ul>
<h4 id="对其他App进行抓包"><a href="#对其他App进行抓包" class="headerlink" title="对其他App进行抓包"></a>对其他App进行抓包</h4><p>滴答清单</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606220920769.png" class="" title="image-20240606220920769">

<p>Frida也支持对多进程App进行抓包：UC浏览器</p>
<img lazyload="" src="/images/loading.svg" data-src="/2024/06/06/Java%E5%B1%82SSL%E9%80%9A%E4%BF%A1%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/image-20240606220944827.png" class="" title="image-20240606220944827">

<p><code>frida -U -p 进程编号 -l hookSSL.js</code></p>
<h4 id="后记："><a href="#后记：" class="headerlink" title="后记："></a>后记：</h4><p>分析后对照源码发现8.0的SSL流程和8.0以后的SSL流程完全不一样，8.0最后的JNI函数分别是</p>
<pre><code>com.android.org.conscrypt.NativeCrypto.SSL_read
com.android.org.conscrypt.NativeCrypto.SSL_write
</code></pre>
<h4 id="附件："><a href="#附件：" class="headerlink" title="附件："></a>附件：</h4><p><a class="link" target="_blank" rel="noopener" href="https://github.com/xiaoeeyu/hookSSL8.0">8.0的hook代码<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a></p>
<p><a class="link" target="_blank" rel="noopener" href="https://github.com/xiaoeeyu/hookSSL11.0/tree/main">11.0的hook代码<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a></p>

		</div>

		
		<div class="post-copyright-info w-full my-8 px-2 sm:px-6 md:px-8">
			<div class="article-copyright-info-container">
    <ul>
        <li><strong>标题:</strong> Java层SSL通信抓包与溯源</li>
        <li><strong>作者:</strong> xiaoeryu</li>
        <li><strong>创建于
                :</strong> 2024-06-06 22:06:18</li>
        
            <li>
                <strong>更新于
                    :</strong> 2024-06-09 17:29:18
            </li>
        
        <li>
            <strong>链接:</strong> https://github.com/xiaoeryu/2024/06/06/Java层SSL通信抓包与溯源/
        </li>
        <li>
            <strong>
                版权声明:
            </strong>
            

            
                本文章采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0">CC BY-NC-SA 4.0</a> 进行许可。
            
        </li>
    </ul>
</div>

		</div>
		

		
		<ul class="post-tags-box text-lg mt-1.5 flex-wrap justify-center flex md:hidden">
			
			<li class="tag-item mx-0.5">
				<a href="/tags/App%E6%8A%93%E5%8C%85/">#App抓包</a>&nbsp;
			</li>
			
			<li class="tag-item mx-0.5">
				<a href="/tags/Frida-Hook/">#Frida Hook</a>&nbsp;
			</li>
			
		</ul>
		

		

		
		<div class="article-nav my-8 flex justify-between items-center px-2 sm:px-6 md:px-8">
			
			<div class="article-prev border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
				<a class="prev" rel="prev" href="/2024/07/04/JNI%E5%B1%82Socket%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%AF%E6%BA%90/">
					<span class="left arrow-icon flex justify-center items-center">
						<i class="fa-solid fa-chevron-left"></i>
					</span>
					<span class="title flex justify-center items-center">
						<span class="post-nav-title-item">JNI层Socket抓包与溯源</span>
						<span class="post-nav-item">上一篇</span>
					</span>
				</a>
			</div>
			
			
			<div class="article-next border-border-color shadow-redefine-flat shadow-shadow-color-2 rounded-medium px-4 py-2 hover:shadow-redefine-flat-hover hover:shadow-shadow-color-2">
				<a class="next" rel="next" href="/2024/06/02/Java%E5%B1%82socket%E6%8A%93%E5%8C%85%E4%B8%8E%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%EF%BC%88%E4%B8%8B%EF%BC%89/">
					<span class="title flex justify-center items-center">
						<span class="post-nav-title-item">Java层socket抓包与源码分析（下）</span>
						<span class="post-nav-item">下一篇</span>
					</span>
					<span class="right arrow-icon flex justify-center items-center">
						<i class="fa-solid fa-chevron-right"></i>
					</span>
				</a>
			</div>
			
		</div>
		


		
		<div class="comment-container px-2 sm:px-6 md:px-8 pb-8">
			<div class="comments-container mt-10 w-full ">
    <div id="comment-anchor" class="w-full h-2.5"></div>
    <div class="comment-area-title w-full my-1.5 md:my-2.5 text-xl md:text-3xl font-bold">
        评论
    </div>
    

        
            


        
    
</div>

		</div>
		
	</div>

	
	<div class="toc-content-container">
		<div class="post-toc-wrap">
	<div class="post-toc">
		<div class="toc-title">目录</div>
		<div class="page-title">Java层SSL通信抓包与溯源</div>
		<ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%82%A3%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E4%B8%8D%E5%86%8D%E5%95%B0%E5%97%A6%EF%BC%8C%E7%9B%B4%E6%8E%A5%E5%BC%80%E5%A7%8B%E8%B0%83%E8%AF%95%E5%90%A7"><span class="nav-text">那环境配置不再啰嗦，直接开始调试吧</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%88%86%E6%9E%90Okio-java%E4%B8%AD%E5%AF%B9%E8%BE%93%E5%87%BA%E6%B5%81%E7%BC%93%E5%86%B2%E5%8C%BA%E7%9A%84%E6%93%8D%E4%BD%9C"><span class="nav-text">分析Okio.java中对输出流缓冲区的操作</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%88%86%E6%9E%90Okio-java%E4%B8%AD%E5%AF%B9%E8%BE%93%E5%85%A5%E6%B5%81%E7%BC%93%E5%86%B2%E5%8C%BA%E7%9A%84%E6%93%8D%E4%BD%9C"><span class="nav-text">分析Okio.java中对输入流缓冲区的操作</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90"><span class="nav-text">源码分析</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#FridaHook"><span class="nav-text">FridaHook</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#hook%E7%82%B9"><span class="nav-text">hook点</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E7%BC%96%E5%86%99%E8%84%9A%E6%9C%AC"><span class="nav-text">编写脚本</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%89%A7%E8%A1%8Chook"><span class="nav-text">执行hook</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%AF%B9%E5%85%B6%E4%BB%96App%E8%BF%9B%E8%A1%8C%E6%8A%93%E5%8C%85"><span class="nav-text">对其他App进行抓包</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%90%8E%E8%AE%B0%EF%BC%9A"><span class="nav-text">后记：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E9%99%84%E4%BB%B6%EF%BC%9A"><span class="nav-text">附件：</span></a></li></ol></li></ol>

	</div>
</div>
	</div>
	
</div>
			</div>

			
		</div>

		<div class="main-content-footer">
			<footer class="footer mt-5 py-5 h-auto text-base text-third-text-color relative border-t-2 border-t-border-color">
    <div class="info-container py-3 text-center">
        
        <div class="text-center">
            &copy;
            
              <span>2022</span>
              -
            
            2025&nbsp;&nbsp;<i class="fa-solid fa-heart fa-beat" style="--fa-animation-duration: 0.5s; color: #f54545"></i>&nbsp;&nbsp;<a href="/">xiaoeryu</a>
            
                
                <p class="post-count space-x-0.5">
                    <span>
                        共撰写了 112 篇文章
                    </span>
                    
                </p>
            
        </div>
        
            <script data-swup-reload-script src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="relative text-center lg:absolute lg:right-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-right">
                
                    <span id="busuanzi_container_site_uv" class="lg:!block">
                        <span class="text-sm">访问人数</span>
                        <span id="busuanzi_value_site_uv"></span>
                    </span>
                
                
                    <span id="busuanzi_container_site_pv" class="lg:!block">
                        <span class="text-sm">总访问量</span>
                        <span id="busuanzi_value_site_pv"></span>
                    </span>
                
            </div>
        
        <div class="relative text-center lg:absolute lg:left-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-left">
            <span class="lg:block text-sm">由 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="relative top-[2px] inline-block align-baseline" version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1rem" height="1rem" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/></svg><a target="_blank" class="text-base" href="https://hexo.io">Hexo</a> 驱动</span>
            <span class="text-sm lg:block">主题&nbsp;<a class="text-base" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v2.8.2</a></span>
        </div>
        
        
            <div>
                博客已运行 <span class="odometer" id="runtime_days" ></span> 天 <span class="odometer" id="runtime_hours"></span> 小时 <span class="odometer" id="runtime_minutes"></span> 分钟 <span class="odometer" id="runtime_seconds"></span> 秒
            </div>
        
        
            <script data-swup-reload-script>
                try {
                    function odometer_init() {
                    const elements = document.querySelectorAll('.odometer');
                    elements.forEach(el => {
                        new Odometer({
                            el,
                            format: '( ddd).dd',
                            duration: 200
                        });
                    });
                    }
                    odometer_init();
                } catch (error) {}
            </script>
        
        
        
    </div>  
</footer>
		</div>
	</div>

	
	<div class="post-tools">
		<div class="post-tools-container">
	<ul class="article-tools-list">
		<!-- TOC aside toggle -->
		
		<li class="right-bottom-tools page-aside-toggle">
			<i class="fa-regular fa-outdent"></i>
		</li>
		

		<!-- go comment -->
		
		<li class="go-comment">
			<i class="fa-regular fa-comments"></i>
		</li>
		
	</ul>
</div>
	</div>
	

	<div class="right-side-tools-container">
		<div class="side-tools-container">
	<ul class="hidden-tools-list">
		<li class="right-bottom-tools tool-font-adjust-plus flex justify-center items-center">
			<i class="fa-regular fa-magnifying-glass-plus"></i>
		</li>

		<li class="right-bottom-tools tool-font-adjust-minus flex justify-center items-center">
			<i class="fa-regular fa-magnifying-glass-minus"></i>
		</li>

		<li class="right-bottom-tools tool-dark-light-toggle flex justify-center items-center">
			<i class="fa-regular fa-moon"></i>
		</li>

		<!-- rss -->
		

		

		<li class="right-bottom-tools tool-scroll-to-bottom flex justify-center items-center">
			<i class="fa-regular fa-arrow-down"></i>
		</li>
	</ul>

	<ul class="visible-tools-list">
		<li class="right-bottom-tools toggle-tools-list flex justify-center items-center">
			<i class="fa-regular fa-cog fa-spin"></i>
		</li>
		
		<li class="right-bottom-tools tool-scroll-to-top flex justify-center items-center">
			<i class="arrow-up fas fa-arrow-up"></i>
			<span class="percent"></span>
		</li>
		
		
	</ul>
</div>
	</div>

	<div class="image-viewer-container">
	<img src="">
</div>

	
	<div class="search-pop-overlay">
	<div class="popup search-popup">
		<div class="search-header">
			<span class="search-input-field-pre">
				<i class="fa-solid fa-keyboard"></i>
			</span>
			<div class="search-input-container">
				<input autocomplete="off" autocorrect="off" autocapitalize="off" placeholder="站内搜索您需要的内容..." spellcheck="false" type="search" class="search-input">
			</div>
			<span class="popup-btn-close">
				<i class="fa-solid fa-times"></i>
			</span>
		</div>
		<div id="search-result">
			<div id="no-result">
				<i class="fa-solid fa-spinner fa-spin-pulse fa-5x fa-fw"></i>
			</div>
		</div>
	</div>
</div>
	

</main>



<script src="/js/build/libs/Swup.min.js"></script>

<script src="/js/build/libs/SwupSlideTheme.min.js"></script>

<script src="/js/build/libs/SwupScriptsPlugin.min.js"></script>

<script src="/js/build/libs/SwupProgressPlugin.min.js"></script>

<script src="/js/build/libs/SwupScrollPlugin.min.js"></script>

<script src="/js/build/libs/SwupPreloadPlugin.min.js"></script>

<script>
    const swup = new Swup({
        plugins: [
            new SwupScriptsPlugin({
                optin: true,
            }),
            new SwupProgressPlugin(),
            new SwupScrollPlugin({
                offset: 80,
            }),
            new SwupSlideTheme({
                mainElement: ".main-content-body",
            }),
            new SwupPreloadPlugin(),
        ],
        containers: ["#swup"],
    });
</script>




	
<script src="/js/build/tools/imageViewer.js" type="module"></script>

<script src="/js/build/utils.js" type="module"></script>

<script src="/js/build/main.js" type="module"></script>

<script src="/js/build/layouts/navbarShrink.js" type="module"></script>

<script src="/js/build/tools/scrollTopBottom.js" type="module"></script>

<script src="/js/build/tools/lightDarkSwitch.js" type="module"></script>

<script src="/js/build/layouts/categoryList.js" type="module"></script>



    
<script src="/js/build/tools/localSearch.js" type="module"></script>




    
<script src="/js/build/tools/codeBlock.js" type="module"></script>




    
<script src="/js/build/layouts/lazyload.js" type="module"></script>




    
<script src="/js/build/tools/runtime.js"></script>

    
<script src="/js/build/libs/odometer.min.js"></script>

    
<link rel="stylesheet" href="/assets/odometer-theme-minimal.css">




  
<script src="/js/build/libs/Typed.min.js"></script>

  
<script src="/js/build/plugins/typed.js" type="module"></script>








    
<script src="/js/build/libs/anime.min.js"></script>





    
<script src="/js/build/tools/tocToggle.js" type="module" data-swup-reload-script=""></script>

<script src="/js/build/layouts/toc.js" type="module" data-swup-reload-script=""></script>

<script src="/js/build/plugins/tabs.js" type="module" data-swup-reload-script=""></script>




<script src="/js/build/libs/moment-with-locales.min.js" data-swup-reload-script=""></script>


<script src="/js/build/layouts/essays.js" type="module" data-swup-reload-script=""></script>





	
</body>

</html>